﻿Namespace EIBData.DPT
    Public NotInheritable Class EIBDataDPT_20_013
        Inherits EIBDataDPT_20_Base

        Public Enum EIBDataDPT_20_013_Values
            NotActive = 0
            _1s = 1
            _2s = 2
            _3s = 3
            _5s = 4
            _10s = 5
            _15s = 6
            _20s = 7
            _30s = 8
            _45s = 9
            _1min = 10
            _1_25m = 11
            _1_5min = 12
            _2min = 13
            _2_5min = 14
            _3min = 15
            _5min = 16
            _15min = 17
            _20min = 18
            _30min = 19
            _1h = 20
            _2h = 21
            _3h = 22
            _5h = 23
            _12h = 24
            _24h = 25
        End Enum

        Protected _value As EIBDataDPT_20_013_Values = Nothing


        Sub New(data As Byte())
            MyBase.New(data)

            _value = _valueBase
        End Sub

        Sub New(value As EIBDataDPT_20_013_Values)
            MyBase.New(value)

            _value = value
        End Sub


        Public Overrides Function ToInfoList() As List(Of EIB.InfoBase)
            Dim list As New List(Of EIB.InfoBase)

            list.Add(New EIB.Info("Type", DPT_Name))
            list.Add(New EIB.Info("Value", String.Format("{0} (0x{0:X})", _value)))

            Return list
        End Function

        Public Shared Shadows ReadOnly Property DPT_Name As String
            Get
                Return "DPT_Time_Delay"
            End Get
        End Property

        Public Shared Shadows ReadOnly Property DPT_Number As String
            Get
                Return "20.013"
            End Get
        End Property

        Public Overrides Function ToString() As String
            Return _value
        End Function

        Public Overloads ReadOnly Property Value As EIBDataDPT_20_013_Values
            Get
                Return _value
            End Get
        End Property
    End Class
End Namespace